package MessagePacks;

/**
 *@author Juan Alapin - 324507516
 *@author Giora Yaffe - 036551281
 *@author Shachar Gritzman - 300174026
 *@author Nir Porat - 021515580
*/

public class ChangeComMember extends MessagePack{
	
	private static final long serialVersionUID = 1L;
	private int newCmID;
	private String cMRole;
	
	/**
	 * Change a committee member
	 * @param newID - New ID for the new committee member
	 * @param role - role for new committee member
	 */
	public ChangeComMember(int newID,String role) {
		super(changeComMember);
		newCmID = newID;
		this.setNewCmRole(role);
	}
	
	/**
	 * 
	 * @return New ID
	 */
	public int getNewCmID(){
		return(newCmID);
	}
	
	/**
	 * 
	 * @param ID - The new committee member ID
	 */
	public void setNewCmID(int ID){
		this.newCmID=ID;
	}
	
	/**
	 * 
	 * @return the new committee member role
	 */
	public String getNewCmRole(){
		return(cMRole);
	}
	
	/**
	 * Sets a role for new committee member
	 * @param role - the new committee member role
	 */
	public void setNewCmRole(String role){
		if((role.equals("Chairman"))||(role.equals("Member1"))||(role.equals("Member2")))
		this.cMRole=new String(role);
	}
}
